<HTML><HEAD><TITLE>?Expr1 and ?Expr2</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(suspend)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>?Expr1 and ?Expr2</H1>
Both Expr1 and Expr2 arithmetically evaluate to 1
<DL>
<DT><EM>Expr1</EM></DT>
<DD>A boolean expression
</DD>
<DT><EM>Expr2</EM></DT>
<DD>A boolean expression
</DD>
</DL>
<H2>Description</H2>
    Suspends until both Expr1 and Expr2 are ground, and then both arguments
    are evaluated. Succeeds if both evaluate to 1.
<P>
    Typically, the expressions contains reifiable constraints, in which case
    a corresponding reified constraint is set up, and the expression is
    replaced by the resulting boolean variable.

<H3>Modules</H3>
This predicate is sensitive to its module context (tool predicate, see @/2).
<H3>Fail Conditions</H3>
Expr1 or Expr2 do not both evaluate to 1
<H3>Exceptions</H3>
<DL>
<DT><EM>(24) number expected </EM>
<DD>Expr1 or Expr2 is not an arithmetic expression.
</DL>
<H2>Examples</H2>
<PRE>
	?- B and 1, B = 1.
	B = 1
	Yes (0.00s cpu)

	?- B and 1, B = 0.
	No (0.00s cpu)

	% arguments are typically reifiable expressions:
	?- X &gt; 5 and X &lt; 7, X = 7.
	No (0.00s cpu)

	% the previous example is equivalent to:
	?- &gt;(X,5,B1), &lt;(X,7,B2), B1 and B2, X=7.
	No (0.00s cpu)

	% and/or/=&gt;/neg are themselves reifiable:
	?- X &gt; 5 and neg(X &lt; 7), X = 7.
	X = 7
	Yes (0.00s cpu)
	</PRE>
<H2>See Also</H2>
<A HREF="../../lib/suspend/and-3.html">and / 3</A>, <A HREF="../../lib/suspend/or-2.html">or / 2</A>, <A HREF="../../lib/suspend/EG-2.html">=> / 2</A>, <A HREF="../../lib/suspend/neg-1.html">neg / 1</A>, <A HREF="../../lib/ic/and-2.html">ic : and / 2</A>
</BODY></HTML>
